USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0013_DROP_TABLES]    Script Date: 11/24/2011 11:24:29 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('WASP_M0013_DROP_TABLES') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0013_DROP_TABLES]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0013_DROP_TABLES]    Script Date: 11/24/2011 11:24:29 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

	
CREATE PROCEDURE [dbo].[WASP_M0013_DROP_TABLES] AS
begin
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_codigos_segurosIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_codigos_segurosIP]
    
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_valores_segurosIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_valores_segurosIP]
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_comision_segurosIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_comision_segurosIP]
    
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_seguro_asisten_penIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_seguro_asisten_penIP]
    
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_produccion_Cuotas]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_produccion_Cuotas]
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_produccion_Cuotas]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_produccion_Cuotas]
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_producion_prueba]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_producion_prueba]
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_produccion_cantidad]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_produccion_cantidad]
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[cabecera_produccion_cabecera]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_produccion_cabecera]
    
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cabecera_codigos_segurosIP_aux]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_codigos_segurosIP_aux]
    
    
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cabecera_valores_segurosIP_aux]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[cabecera_valores_segurosIP_aux]
    
end     

GO


